package cn.edu.swu.cy.io;

import java.io.IOException;

public class IoTest {

    public static void main(String[] args) throws IOException {
        String sourceFilePath = "D:\\java\\img1.png";
        String targetFilePath = "D:\\java\\image_data\\img2.png";

        FileCopyer copyer = new FileCopyer();
        copyer.copy(sourceFilePath, targetFilePath);

        String url = "https://docs.oracle.com/javase/tutorial/images/ThinkingDuke.png";
        String targetFilePath2 = "D:\\java\\image_data\\img3.png";
        ImageDownloader downloader = new ImageDownloader();
        downloader.download(url, targetFilePath2);
    }

}
